package com.atguigu.realtime.gmallpublisher.service;

import com.atguigu.realtime.gmallpublisher.bean.ProductStats;
import com.atguigu.realtime.gmallpublisher.mapper.ProductStatsMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.List;

/**
 * @Author lizhenchao@atguigu.cn
 * @Date 2021/3/26 14:39
 */

@Service
public class ProductStatsServiceImp implements ProductStatsService {
    
    @Autowired
    ProductStatsMapper product;
    
    @Override
    public BigDecimal getGMV(int date) {
        
        return product.getGMV(date);
    }
    
    @Override
    public List<ProductStats> getProductStatsByTM(int date, int limit) {
        return product.getProductStatsByTM(date, limit);
    }
    
    @Override
    public List<ProductStats> getProductStatsBySpu(int date, int limit) {
        return product.getProductStatsBySpu(date, limit);
    }
    
    @Override
    public List<ProductStats> getProductStatsByC3(int date, int limit) {
        return product.getProductStatsByC3(date, limit);
    }
    
}
